﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace RSSNewsGrabberModule.Models
{
    public class AdditionalInformationRoot 
    {
        private readonly XElement _root;

        public AdditionalInformationRoot(string rootName)
        {
            _root = new XElement(rootName);
        }

        public void Add(XElement element)
        {
            _root.Add(element);
        }

        public void Remove(XElement element)
        {
            _root.Elements(element.Name).Remove();
        }

        public override string ToString()
        {
            return _root.ToString();
        }
    }
}
